﻿using AutoMapper;
using Rcompany.DTO;
using Rcompany.InputInvoices;
using Rcompany.Model;
using Rcompany.PaymentApprovalDTO;
using Rcompany.PaymentManagementDTO;
using Rcompany.SalesInvoiceDTO;

namespace Rcompany
{
    /// <summary>
    /// 项目映射
    /// </summary>
    public class RcompanyApplicationAutoMapperProfile : Profile
    {
        public RcompanyApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            CreateMap<InputInvoice, InputInvoiceDto>();
            CreateMap<CreateUpdateInputInvoiceDto, InputInvoice>();

            CreateMap<PaymentManagement, PaymentManagementDto>();
            CreateMap<PaymentManagement, CreateUpdatePaymentDto>();
            CreateMap<CreateUpdatePaymentDto, PaymentManagement>();

            CreateMap<PaymentApproval, PaymentApprovalDto>();
            CreateMap<CreateUpdateApprovalDto, PaymentApproval>();

            CreateMap<PaymentManagement, PaymentApprovalDto>();
            CreateMap<CreateUpdateApprovalDto, PaymentManagement>();


            CreateMap<SalesInvoice, SalesInvoiceDto>();
            CreateMap<CreateUpdateSalesInvoiceDto, SalesInvoice>();
        }
    }
}
